﻿using DML = DocumentFormat.OpenXml.Lite.DrawingML;
using DMLGP = DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DMLV = DocumentFormat.OpenXml.Lite.DrawingML.Visual;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Drawing
{
    [XmlRoot("pic", Namespace = Constants.Drawing)]
    public class Picture : XmlSerializable, IGraphicObject
    {
        [Optional]
        [XmlAttribute("macro", Form = XmlSchemaForm.Qualified)]
        public string CustomFunctionReference { get; set; }

        [Optional]
        [XmlAttribute("fPublished", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> PublishToServer { get; set; }

        [XmlElement("nvPicPr", Namespace = Constants.Drawing)]
        public NonVisualPictureProperties NonVisualProperties { get; set; }

        [XmlElement("blipFill", Namespace = Constants.Drawing)]
        public DMLV.BlipFill BlipFill { get; set; }

        [XmlElement("spPr", Namespace = Constants.Drawing)]
        public DMLGP.ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("style", Namespace = Constants.Drawing)]
        public DML.Color.Style Style { get; set; }

        public Picture() { }
    }
}
